from exts import db


# 历史上的今天
class Today_in_history(db.Model):
    __tablename__ = "Today_in_history"
    __table_args__ = {"extend_existing": True}
    Tid = db.Column(db.Integer, primary_key=True, autoincrement=True)
    T_year = db.Column(db.String(10), nullable=False)  # 年份
    incident = db.Column(db.String(100), nullable=False, unique=True)  # 事件
    T_month = db.Column(db.String(10), nullable=False)  # 发生的月份


# 全部软件
class software_All(db.Model):
    __tablename__ = "Software_All"
    __table_args__ = {"extend_existing": True}
    # 软件名字：S_name,软件图标：S_picture，软件标签：S_tag，软件详情网址：S_details
    Sid = db.Column(db.Integer, primary_key=True, autoincrement=True)
    S_name = db.Column(db.String(200), nullable=False, unique=True)
    S_picture = db.Column(db.String(200), unique=True)
    S_tag = db.Column(db.String(100), nullable=True)
    S_details = db.Column(db.String(200), nullable=True,unique=True)


# 全部软件对应的详情数据
class Software_information(db.Model):
    __tablename__ = "Software_information"
    __table_args__ = {"extend_existing": True}
    info_id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    infor_orders = db.Column(db.Text(12000), nullable=True)
    S_id = db.Column(db.String(50), nullable=False, unique=True)
    Download = db.Column(db.String(200),nullable= True)


class Truth_Dare(db.Model):
    __tablename__ = "Truth_Dare"
    __table_args__ = {"extend_existing": True}
    TD_id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    True_words = db.Column(db.String(500), nullable=False,unique=True)
    # 真心话数据，并未有大冒险的数据
    # Wild_Adventure = db.Column(db.String(500), nullable=True,unique=True)

